CMOS based X-ray imaging systems are often based on arrays of active pixel sensors. In medical equipment, it is required to make use of all X-radiation that was applied to the patient. Hence there is a requirement to not ignore any signal originating from the X-radiation. Therefore, there are required means to select various gain settings within each pixel cell.